<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8" />
        <title>20_对象-创建对象3-构造函数-给对象添加属性</title>
    </head>
    <body>
        <script>
            function Person(name,age){
                this.name = name;
                this.age = age;
            }

            var person = new Person('马志强',70);
            console.log(person);

            person.color = 'black';
            console.log(person);


            var person1 = new Person('马蓉',71);
            console.log(person1);
        </script>
    </body>
</html>